﻿Public Class Map

    Public Sub tick(ByVal lon, ByVal lan)




        PictureBox1.ImageLocation = ("http://maps.google.com/maps/api/staticmap?center=" & lon & "," & lan & "&zoom=" & TrackBar1.Value & "&size=650x560&sensor=false")
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sfd As New SaveFileDialog
        sfd.InitialDirectory = "C:\"
        sfd.Filter = "Bild (*.bmp)|*.bmp"
        sfd.Title = "Wählen Sie eine Datei zum Speichern aus"
        If sfd.ShowDialog() = DialogResult.OK Then
            
            PictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
        Else
            MsgBox("Abbruch")
        End If

    End Sub

    Private Sub Map_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TopMost = True
    End Sub
End Class